package com.gopay.common.domain.oldmermove;

// Generated 2014-7-3 15:52:13 by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * 老平台迁移商户开通交易记录PK
 * @OldMovedMerOpenTranId.java
 * @author lizheng
 * @2014-7-3 下午4:27:06  www.gopay.com.cn Inc.All rights reserved.
 */
@Embeddable
public class OldMovedMerOpenTranId implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private String merId;
    private String tranCode;

    public OldMovedMerOpenTranId() {
    }

    public OldMovedMerOpenTranId(String merId, String tranCode) {
        this.merId = merId;
        this.tranCode = tranCode;
    }

    @Column(name = "MER_ID", nullable = false, length = 10)
    public String getMerId() {
        return this.merId;
    }

    public void setMerId(String merId) {
        this.merId = merId;
    }

    @Column(name = "TRAN_CODE", nullable = false, length = 10)
    public String getTranCode() {
        return this.tranCode;
    }

    public void setTranCode(String tranCode) {
        this.tranCode = tranCode;
    }

    @Override
    public boolean equals(Object other) {
        if ((this == other)) {
            return true;
        }
        if ((other == null)) {
            return false;
        }
        if (!(other instanceof OldMovedMerOpenTranId)) {
            return false;
        }
        OldMovedMerOpenTranId castOther = (OldMovedMerOpenTranId) other;

        return ((this.getMerId() == castOther.getMerId()) || (this.getMerId() != null && castOther.getMerId() != null && this
                .getMerId().equals(castOther.getMerId())))
                && ((this.getTranCode() == castOther.getTranCode()) || (this.getTranCode() != null
                        && castOther.getTranCode() != null && this.getTranCode().equals(castOther.getTranCode())));
    }

    @Override
    public int hashCode() {
        int result = 17;

        result = 37 * result + (getMerId() == null ? 0 : this.getMerId().hashCode());
        result = 37 * result + (getTranCode() == null ? 0 : this.getTranCode().hashCode());
        return result;
    }

}
